import Vue from 'vue'
import Router from 'vue-router'

import Index from '@/views/Index'
import Main from '@/views/Main'
import One from '@/views/One'
import Two from '@/views/two/Index'
import Three from '@/views/two/Three'
import Four from '@/views/two/Four'
import Board from '@/views/board/Board'

Vue.use(Router);
const routes = [{
    path: '/', name: 'index', meta: {icon: '', name: '主页'}, component: Index, children: [
        {
            path: '/main', name: 'main', meta: {icon: 'home', name: '倒计时'}, component: Main
        }, {
            path: '/one', name: 'one', meta: {icon: 'user', name: '表格'}, component: One
        }, {
            path: '/board', name: 'board', meta: {icon: 'user', name: '看板'}, component: Board
        },  {
            path: '/two', name: 'two', meta: {icon: 'mail', name: '其他'}, component: Two, children: [
                {
                    path: 'three', name: 'three', meta: {icon: 'mail', name: '动态配置'}, component: Three
                }, {
                    path: 'four', name: 'four', meta: {icon: 'mail', name: 'Apollo'}, component: Four
                }
            ]
        }
    ]
}];
export default new Router({
    // mode: 'history',
    base: '/',
    routes: routes
})
